package com.bw.liuyushan.mvp_lib.View;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.bw.liuyushan.mvp_lib.Presenter.IPresenter;

/**
 * ZhuanGao4_WeekTest2
 * file name is : BaseActivity
 * created by Ender on 2021/8/23 8:18.
 * author : 刘雨杉
 * Describe(作用):
 */
public abstract class BaseActivity<P extends IPresenter> extends AppCompatActivity implements IActivity,IView {
    protected P ip;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(bindLayout());
        initView();
        initDate();

    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        if(ip!=null){
            ip.Destory();
            ip=null;
        }
    }
}
